home *** CD-ROM | disk | FTP | other *** search
- Amiga Sozobon-C v1.01 - 13 June 1989.
- Bug reports to jlydiatt@jlami.wimsey.bc.ca (Jeff Lydiatt)
-
- This is a full port of the Sozobon-C compiler from the Atari St version,
- including a freely redistributable C library.
-
- Implementation Notes:
-
- The Sozobon-C compiler:
- -----------------------
-
- Sozobon-C appears to be a fairly complete K&R compatible C compiler written
- by Johann Ruegg now running on the Atari ST. Joe Montgomery subsequently
- revised it to generate assembler code compatible with Charlie Gibb's A68k
- compiler. I have subsequently modified it for 4 byte integers, fixed a few
- bugs, and cleaned up the output a little. I made no extensions to the
- compiler other than to have it recognize the universal pointer (void *).
-
-
- Coalescing Hunks:
- -----------------
-
- The sozobon compiler freely intersperses code, data, and bss hunks
- when it generates the assembler file. This is handled without complaint by
- the A68k assembler, but the hunks generated by A68k can give the linker,
- blink, some problems. Typical symptoms are that the program blink
- generates is not runnable. Occasionally, blink will run off the rails
- while processing these files. Can you say Guru? I knew you could!
-
- As a temporary fix for this problem, I have implemented a coalesce function
- in the optimizer phase. For this reason, cc always invokes the optimizer
- using the lowest level of optimization possible. If you want the
- full optimization, you must specify the -O option in cc.
-
-
- The optimizer.
- --------------
-
- The optimizer seems to be pretty reliable and does some pretty significant
- optimizations to boot. My hat's off to Tony Andrews for the super job he
- did in writing it. Implementing the optimizer cut the ZC.lib library by
- about 7K for example. The optimizer can take significant time however,
- particulary in large programs. I have also noticed it to be slower than it
- should on small programs that have switch statements with a lot of case
- statements too. You will occasionally have to be prepared to be paitent.
-
-
- Ami.lib.
- --------
-
- Ami.lib is a version of Amiga.lib which contains all the glue routines to
- the Amiga's libraries. I generated the assembler source code for it from
- .fd files that AmigaBASIC uses, and then passed it through Charlie's
- assembler. A few routines are missing and are hand coded. I think Ami.lib
- should be freely redistributable, but I've included the source and binaries
- for the program I used to generate the library anyway.
-
-
- CC
- --
-
- CC is a front end that makes it easier to compile, assemble and link
- programs without a lot of typing. For example to compile a simple hello
- world program called hello.c, all you need to do is type "cc hello.c".
-
- CC is a adapted from Fred Fish's cc on Fred Fish #2 to recognize the syntax
- for Sozobon-C, the optimizer, A68k and Blink. CC also uses a replacement
- for Manx's fexecv() that fixes a bug in the manx version so the return code
- is passed back to the caller. Ralph Babel did most of the work in the
- assembler subroutine System0.asm. I wrote the interface code to search all
- directories specified by the path command and load the command via
- LoadSeg().
-
-
- MAKE
- ----
-
- This program is the public domain Make program which appeared on usenet
- mod.sources, Volume 7, number 91. Steve Walton ported it to the Amiga
- under Manx Aztec C version 3.40a. The documentation assumes you know Make,
- and simply points out the Amiga specific features of the program.
-
-
- The support library.
- --------------------
-
- The support library is Dale Schumacher's "dlibs.libs" which I have
- converted to work on the Amiga. It was no small task, and is still not
- yet fully ported. Feel free to fix that:-)
-
- You will find the functions that are implemented are a useful subset
- comprising 90% or so of the commonly used library routines. I used the
- motorola fast floating point library to implement the floating point
- functions though, rather than use the assembler routines in dlibs.
-
- A note about error codes. Dale mentions in his documentation that
- all functions return negative values on error. The amiga version
- can generate positive errors on error returns from AmigaDos. If the global
- variable errno has a positive value, it's probably an error return from
- AmigaDos using the IoErr() function. The perror() funtion does not yet
- recognize AmigaDos errors.
-
-
- C Header files in "include".
- ------------------------------
-
- The header files in include contain all the standard c header files like
- "stdio.h" that go with the ZC.lib library. If however, you want to take
- advantage of the superb graphics in the amigia, you will also require the
- include files supplied by commodore that describe the layout of important
- data structures in the Amiga's operating system. These are normally
- supplied with the commercial compliers, but since this is a PD effort, you
- are out of luck. If you already have Lattice C or Aztec C on the Amiga,
- you may be able to use the include files from those compilers. If not, the
- include files are available from commodore for a nominal $20 fee. Write
- to:
-
- Commodore Business Machines
- Software Department
- 1200 Wilson Drive
- West Chester, PA 19380
-
- Ask for the "AmigaDos 1.3 Native Developer Upgrade". The kit contains all
- the assembler and C include files, the libraries, autodocs, readme files,
- alink, and the library offsets. It comes on 3 or 4 disks - well worth the
- $20.
-
- Jeff Lydiatt.
- jlydiatt@jlami.wimsey.bc.ca
-